package com.ai.module.chat.config;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.List;

/**
 * @author: heJinQin
 * @create: 2024-03-03 21:52
 * @description:
 **/

@Data
public class ChatImageBo {

    private String model= "gpt-4-vision-preview";

    private List<ChatGptMessage> messages;

    Double temperature = 0.5;

    @Data
    public static class ChatGptMessage {

        String role="user";

        List<OpenaiContent> content;

    }
    // @JsonProperty("validation_file")
    @Data
    public static class OpenaiContent {

        private String type;

        @JsonProperty("image_url")
        private ImageUrl imageUrl;

        private String text;

    }

    @JsonProperty("max_tokens")
    int maxTokens = 1500;

    @Data
    @AllArgsConstructor
    public static class ImageUrl {
        private String url;
    }

}
